<template>
  <div class="category">
    <h3>{{ title }}分类</h3>
    <slot :listData="listData"> </slot>
  </div>
</template>

<script>
export default {
  props: ["title"],
  data() {
    return {
      listData: ["红色警戒", "穿越火线", "劲舞团", "超级玛丽"],
    };
  },
};
</script>

<style scoped lang="scss">
.category {
  background: skyblue;
  width: 200px;
  min-height: 300px;
  padding: 1rem;

  & h3 {
    text-align: center;
    background: orange;
  }

  & img,
  & video {
    width: 100%;
    object-fit: cover;
  }
}
</style>
